import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-09-01
 * Time: 21:34
 */

//获取一个数二进制序列中所有的偶数位和奇数位，分别输出二进制序列
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        System.out.println("原始二进制：" + Integer.toBinaryString(num));

        //1.输出奇数位
        System.out.print("奇数位：");
        for (int i = 30; i >= 0 ; i -= 2) {
            System.out.print(((num >>> i) & 1) + " " );
        }
        System.out.println();

        //2.输出偶数位
        System.out.print("偶数位：");
        for (int i = 31; i >= 0 ; i -= 2) {
            System.out.print(((num >>> i) & 1) + " ");
        }
        System.out.println();
    }
}
